/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package FrameWork.Objects.Chacracter.Enemy;
import GamePlay.Global;
import java.io.IOException;

/**
 *
 * @author DANTRUONG
 */
public class Chicken extends Friend{
    public Chicken(int _X,int _Y, int _SizeX, int _SizeY, 
            float _TimeAni, float _TimeSpeed,int _Direct,
            int _Map[][],int _Width, int _Height, int _ID) throws IOException{
    super(_X,_Y,_SizeX,_SizeY, _TimeAni, _TimeSpeed,_Direct,_Map,_Width,_Height, _ID);
    m_CurFrame = 12;
    }
    public void UpdateAnimation (float _Time){
        
        m_SaveTimeAni += _Time;
        if (m_SaveTimeAni>= m_TimeAni){
            m_SaveTimeAni = 0;
            switch (m_CurDirect)
            {
            case Global.DIR_UP: 
                m_CurFrame= (m_CurFrame + 1)%3 + 21;
                break;
            case Global.DIR_DOWN: 
                m_CurFrame= (m_CurFrame+1)%3 + 12;
                break;
            case Global.DIR_LEFT:
                m_CurFrame= (m_CurFrame+1)%3 + 15;
                break;
            case Global.DIR_RIGHT: 
                m_CurFrame= (m_CurFrame+1)%3 + 18;
                break;
            }        
        }
        
    }
}
